feat: add reproducible build flags#324
Merged
18202781743 merged 1 commit intolinuxdeepin:masterfrom Nov 17, 2025
Merged
Conversation
Added CMAKE_SKIP_BUILD_RPATH=ON flag to DEB_CMAKE_EXTRA_FLAGS for reproducible builds This change ensures that build paths are not embedded in binaries, making builds more deterministic The flag is passed to dh_auto_configure command to apply during CMake configuration This improves package reproducibility across different build environments Influence: 1. Verify that builds produce identical binaries when built in different directories 2. Test that RPATH is not embedded in compiled binaries 3. Check that package functionality remains unchanged 4. Validate build process completes successfully with the new flag feat: 添加可重复编译参数 在DEB_CMAKE_EXTRA_FLAGS中添加CMAKE_SKIP_BUILD_RPATH=ON标志以实现可重复 编译 此更改确保构建路径不会嵌入到二进制文件中,使构建更加确定性 该标志通过dh_auto_configure命令传递给CMake配置过程 这提高了在不同构建环境中软件包的可重复性 Influence: 1. 验证在不同目录中构建时是否产生相同的二进制文件 2. 测试编译后的二进制文件中是否未嵌入RPATH 3. 检查软件包功能是否保持不变 4. 验证构建过程在使用新标志后能否成功完成
Reviewer's guide (collapsed on small PRs)Reviewer's GuideAdds the CMAKE_SKIP_BUILD_RPATH=ON flag to the Debian packaging configuration to prevent build paths from being embedded in binaries, ensuring reproducible builds across different environments. File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
Contributor
|
Warning
|
Contributor
deepin pr auto review我来对这个git diff进行代码审查:
改进后的代码建议: export DEB_CFLAGS_MAINT_APPEND = -Wall
export DEB_CXXFLAGS_MAINT_APPEND = -Wall
export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed -Wl,-z,relro -Wl,-z,now -Wl,-z,noexecstack -Wl,-E
# reproducible build flags
DEB_CMAKE_EXTRA_FLAGS ?= -DCMAKE_SKIP_BUILD_RPATH=ON -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_POSITION_INDEPENDENT_CODE=ON
DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)这些改进将使代码更加健壮、安全和易于维护。 |
mhduiy
approved these changes
Nov 17, 2025
Contributor
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: 18202781743, mhduiy The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Added CMAKE_SKIP_BUILD_RPATH=ON flag to DEB_CMAKE_EXTRA_FLAGS for reproducible builds
This change ensures that build paths are not embedded in binaries, making builds more deterministic
The flag is passed to dh_auto_configure command to apply during CMake configuration
This improves package reproducibility across different build environments
Influence:
feat: 添加可重复编译参数
在DEB_CMAKE_EXTRA_FLAGS中添加CMAKE_SKIP_BUILD_RPATH=ON标志以实现可重复 编译
此更改确保构建路径不会嵌入到二进制文件中,使构建更加确定性
该标志通过dh_auto_configure命令传递给CMake配置过程
这提高了在不同构建环境中软件包的可重复性
Influence:
Summary by Sourcery
Enable reproducible builds by adding the CMAKE_SKIP_BUILD_RPATH=ON flag in debian/rules to prevent embedding build paths in binaries and ensure deterministic package outputs across environments
New Features:
Enhancements:
Build: